/*
 * Amazon Ads API - Sponsored Products
 * Use the Amazon Ads API for Sponsored Products for campaign, ad group, keyword, negative keyword, and product ad management operations. For more information about Sponsored Products, see the [Sponsored Products Support Center](https://advertising.amazon.com/help?entityId=ENTITY3CWETCZD9HEG2#GWGFKPEWVWG2CLUJ). For onboarding information, see the [account setup](setting-up/account-setup) topic.<br/><br/> 
 *
 * The version of the OpenAPI document: 2.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.openapitools.client.model.SuggestedBid;
import org.openapitools.client.model.TargetingExpressionPredicate;

/**
 * InlineResponse200Recommendations
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-04-12T19:05:39.971406+08:00[Asia/Shanghai]")
public class InlineResponse200Recommendations {
  public static final String SERIALIZED_NAME_SUGGESTED_BID = "suggestedBid";
  @SerializedName(SERIALIZED_NAME_SUGGESTED_BID)
  private SuggestedBid suggestedBid;

  public static final String SERIALIZED_NAME_EXPRESSION = "expression";
  @SerializedName(SERIALIZED_NAME_EXPRESSION)
  private TargetingExpressionPredicate expression;

  /**
   * The response code.
   */
  @JsonAdapter(CodeEnum.Adapter.class)
  public enum CodeEnum {
    SUCCESS("SUCCESS"),
    
    INVALID_ARGUMENT("INVALID_ARGUMENT"),
    
    NOT_FOUND("NOT_FOUND"),
    
    INTERNAL_ERROR("INTERNAL_ERROR"),
    
    SERVER_IS_BUSY("SERVER_IS_BUSY"),
    
    UNAUTHORIZED("UNAUTHORIZED");

    private String value;

    CodeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static CodeEnum fromValue(String value) {
      for (CodeEnum b : CodeEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter<CodeEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final CodeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public CodeEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return CodeEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_CODE = "code";
  @SerializedName(SERIALIZED_NAME_CODE)
  private CodeEnum code;


  public InlineResponse200Recommendations suggestedBid(SuggestedBid suggestedBid) {
    
    this.suggestedBid = suggestedBid;
    return this;
  }

   /**
   * Get suggestedBid
   * @return suggestedBid
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public SuggestedBid getSuggestedBid() {
    return suggestedBid;
  }


  public void setSuggestedBid(SuggestedBid suggestedBid) {
    this.suggestedBid = suggestedBid;
  }


  public InlineResponse200Recommendations expression(TargetingExpressionPredicate expression) {
    
    this.expression = expression;
    return this;
  }

   /**
   * Get expression
   * @return expression
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public TargetingExpressionPredicate getExpression() {
    return expression;
  }


  public void setExpression(TargetingExpressionPredicate expression) {
    this.expression = expression;
  }


  public InlineResponse200Recommendations code(CodeEnum code) {
    
    this.code = code;
    return this;
  }

   /**
   * The response code.
   * @return code
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The response code.")

  public CodeEnum getCode() {
    return code;
  }


  public void setCode(CodeEnum code) {
    this.code = code;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    InlineResponse200Recommendations inlineResponse200Recommendations = (InlineResponse200Recommendations) o;
    return Objects.equals(this.suggestedBid, inlineResponse200Recommendations.suggestedBid) &&
        Objects.equals(this.expression, inlineResponse200Recommendations.expression) &&
        Objects.equals(this.code, inlineResponse200Recommendations.code);
  }

  @Override
  public int hashCode() {
    return Objects.hash(suggestedBid, expression, code);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class InlineResponse200Recommendations {\n");
    sb.append("    suggestedBid: ").append(toIndentedString(suggestedBid)).append("\n");
    sb.append("    expression: ").append(toIndentedString(expression)).append("\n");
    sb.append("    code: ").append(toIndentedString(code)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

